package top.easycode.app.dao;

import org.apache.ibatis.annotations.Param;
import top.easycode.app.model.UserInfo;

public interface UserInfoMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(UserInfo record);

    int insertSelective(UserInfo record);

    UserInfo selectByPrimaryKey(Integer id);

    /**
     * 通过登录名密码登录
     * @param username
     * @param password
     * @return
     */
    UserInfo selectByNameAndPwd(@Param("username")String username, @Param("password")String password);

    /**
     * 通过登录名或者手机号查询用户
     * @param username
     * @return
     */
    UserInfo selectByName(@Param("username")String username);

    int updateByPrimaryKeySelective(UserInfo record);

    int updateByPrimaryKey(UserInfo record);
}